package com.jhnote.dao;

import com.jhnote.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface UserMapper {

    /**
     * 使用注解时，配置文件的加载用class指定
     * eg: <mapper class="com.jhnote.dao.UserMapper"/>
     * @param id int
     * @return User
     */
    @Select("Select id, name, password as passwd from user where id=#{id}")
    User getUserById(@Param("id") int id);

}
